package org.bluedream.core.module.sys.config.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.bluedream.comm.base.OrgPageEntity;
import org.bluedream.comm.base.PageEntity;
import org.bluedream.comm.fill.annotation.FillType;
import org.bluedream.comm.fill.annotation.TargetField;

@Data
@ToString(callSuper = true)
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName(value = "sys_config")
public class Config extends OrgPageEntity<Config> {
    private static final long serialVersionUID = 5679150006056415509L;
    private String configName;
    private String configKey;
    private String configValue;
    @TargetField(fill = FillType.INSERT , value = "1" , fillMethod = "setIsSys")
    private String isSys;

    public Config(Long limit , Long pageSize){
        this.limit = limit;
        this.page = pageSize;
    }

    public Config(String id){
        this.id = id;
    }
}
